<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			div{
				width: 300px;
				height: 400px;
				position: fixed;
				right: 0;
				bottom: 0;
				transition: 1s;
			}
			button{
				position: absolute;
				top: 0;
				right: 0;
			}
		</style>
	</head>
	<body>
		<div>
			<img src="an.jpg"/>
			<button>X</button>
		</div>
		
		<script type="text/javascript">
			var but=document.getElementsByTagName("button")[0];
			var div=document.getElementsByTagName("div")[0];
			but.onclick=function(){
				div.style.bottom="-100%"
				setTimeout(()=>{
					div.style.bottom="0%";
				},5000)
			}
			
			
		</script>
	</body>
</html>
